﻿using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.IO;
using System.Xml;
using System.Xml.Serialization;

namespace AppDataStruct
{
    /// <summary>
    /// 护照申请信息
    /// </summary>
    [Serializable]
    [XmlRoot("PassportApplyInfo")]
    public class PassportApplyInfo
    {
        /// <summary>
        /// 业务编号
        /// </summary>
        private string _ywbh;
        [XmlElement("YWBH")]
        public string YWBH
        {
            get { return _ywbh; }
            set { _ywbh = value; }
        }

        private string _WSQ;
        [XmlElement("WSQ")]
        public string WSQ
        {
            get { return _WSQ; }
            set { _WSQ = value; }
        }

        private string _WSQ_File;
        [XmlElement("WSQ_File")]
        public string WSQ_File
        {
            get { return _WSQ_File; }
            set { _WSQ_File = value; }
        }

        private string _wsz;
        [XmlElement("WSZ")]
        public string WSZ
        {
            get { return _wsz; }
            set { _wsz = value; }
        }


        private string _jpz;
        [XmlElement("JPZ")]
        public string JPZ
        {
            get { return _jpz; }
            set { _jpz = value; }
        }


        private string _md5;
        [XmlElement("MD5")]
        public string MD5
        {
            get { return _md5; }
            set { _md5 = value; }
        }

        private string _md5_file;
        [XmlElement("MD5_File")]
        public string MD5_File
        {
            get { return _md5_file; }
            set { _md5_file = value; }
        }

        private string _err;
        [XmlElement("ERR")]
        public string ERR
        {
            get { return _err; }
            set { _err = value; }
        }

        private string _err_file;
        [XmlElement("ERR_File")]
        public string ERR_File
        {
            get { return _err_file; }
            set { _err_file = value; }
        }

        private string _tpl;
        [XmlElement("TPL")]
        public string TPL
        {
            get { return _tpl; }
            set { _tpl = value; }
        }

        private string _tpl_file;
        [XmlElement("TPL_File")]
        public string TPL_File
        {
            get { return _tpl_file; }
            set { _tpl_file = value; }
        }

        /// <summary>
        /// 手写签名
        /// </summary>
        private string _sqxm;
        [XmlElement("SXQM")]
        public string SXQM
        {
            get { return _sqxm; }
            set { _sqxm = value; }
        }

        /// <summary>
        /// 证件号码
        /// </summary>
        private string _zjhm;
        [XmlElement("ZJHM")]
        public string ZJHM
        {
            get { return _zjhm; }
            set { _zjhm = value; }
        }

        /// <summary>
        /// 现持证件有效期至
        /// </summary>
        private string _zjyxqz;
        [XmlElement("ZJYXQZ")]
        public string ZJYXQZ
        {
            get { return _zjyxqz; }
            set { _zjyxqz = value; }
        }

        /// <summary>
        /// 现持证件签发日期
        /// </summary>
        private string _qfrq;
        [XmlElement("QFRQ")]
        public string QFRQ
        {
            get { return _qfrq; }
            set { _qfrq = value; }
        }

        /// <summary>
        /// 前往地
        /// </summary>
        private CodeMap _qwd = new CodeMap();
        [XmlElement("QWD")]
        public CodeMap QWD
        {
            get { return _qwd; }
            set { _qwd = value; }
        }

        /// <summary>
        /// 出境事由
        /// </summary>
        private CodeMap _sqsy = new CodeMap();
        [XmlElement("SQSY")]
        public CodeMap SQSY
        {
            get { return _sqsy; }
            set { _sqsy = value; }
        }

        /// <summary>
        /// 业务类别
        /// </summary>
        private CodeMap _ywlb = new CodeMap();

        public CodeMap YWLB
        {
            get { return _ywlb; }
            set { _ywlb = value; }
        }

        private CodeMap _sfjz = new CodeMap();

        public CodeMap SFJZ
        {
            get { return _sfjz; }
            set { _sfjz = value; }
        }

        private List<LabellextApplyInfo> _hzjz = new List<LabellextApplyInfo>();
        [XmlArray("HZJZ")]
        [XmlArrayItem("JZ")]
        public List<LabellextApplyInfo> HZJZ
        {
            get { return _hzjz; }
            set { _hzjz = value; }
        }

        /// <summary>
        /// 现持护照号码
        /// </summary>
        private string _passportnonow;
        [XmlElement("PassportNoNow")]
        public string PassportNoNow
        {
            get { return _passportnonow; }
            set { _passportnonow = value; }
        }

        /// <summary>
        /// 现持护照有效期
        /// </summary>
        private string passportvalidity;
        [XmlElement("PassportValidity")]
        public string PassportValidity
        {
            get { return passportvalidity; }
            set { passportvalidity = value; }
        }

        /// <summary>
        /// 现持证件状态
        /// </summary>
        private string paperStatus;
        [XmlElement("PaperStatus")]
        public string PaperStatus
        {
            get { return paperStatus; }
            set { paperStatus = value; }
        }

        public void Reset()
        {
            _ywbh = "";
            _err = "";
            _jpz = "";
            _wsz = "";
            _WSQ = "";
            _tpl = "";
            _md5 = "";
            _hzjz.Clear();
            _sfjz.Reset();
            _ywlb.Reset();
            _sfjz.Reset();
        }
    }
}

